package vn.easyticket.db.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * The primary key class for the M112_ACTORMOVIE database table.
 */
@Embeddable
public class M112_Actor_MoviePK
  implements Serializable

{
    private static final long serialVersionUID = 3701234460032678707L;

    @Column( name = "ActorId", unique = true, nullable = false )
    private int actorId;

    @Column( name = "MovieId", unique = true, nullable = false )
    private int movieId;

    public M112_Actor_MoviePK()
    {
    }

    public int getActorId()
    {
        return this.actorId;
    }

    public void setActorId( int actorId )
    {
        this.actorId = actorId;
    }

    public int getMovieId()
    {
        return this.movieId;
    }

    public void setMovieId( int movieId )
    {
        this.movieId = movieId;
    }

    public boolean equals( Object other )
    {
        if ( this == other )
        {
            return true;
        }
        if ( !( other instanceof M112_Actor_MoviePK ) )
        {
            return false;
        }
        M112_Actor_MoviePK castOther = (M112_Actor_MoviePK) other;
        return ( this.actorId == castOther.actorId ) && ( this.movieId == castOther.movieId );
    }

    public int hashCode()
    {
        final int prime = 31;
        int hash = 17;
        hash = hash * prime + this.actorId;
        hash = hash * prime + this.movieId;

        return hash;
    }
}